package di

import (
	"fmt"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/customer"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/file"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/message"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/mini_program"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/organization"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/report"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/site_announcement"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/strategic_monitor"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/tenant/create_tenant"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/tenant/tenant"
	user3 "git.mycaigou.com/gfyx/micro-gfyx-user-service/service/user"
)

func (c *inject) InjectService() {
	services := []interface{}{
		file.NewFileService,
		message.NewVerifyCodeService,
		mini_program.NewMiniProgramService,
		organization.NewOrganizationService,
		report.NewReportService,
		user3.NewUserInfoService,
		user3.NewUserLoginService,
		customer.NewCustomerGroupService,
		tenant.NewTenantService,
		create_tenant.NewCreateTenantService,
		strategic_monitor.NewStrategicMonitorService,
		site_announcement.NewSiteAnnouncementService,
	}
	var errs []error
	for _, repo := range services {
		err := c.Provide(repo)
		if err != nil {
			errs = append(errs, err)
		}
	}
	fmt.Printf("InjectService errors:#%+v\n", errs)
}
